<?php
/**
 * 中奖信息记录
 * 记录中奖信息，可以统计谁什么时候中了什么奖，也可以对活动进行结算
 */
namespace App\Contracts\Repositories;

interface ActivityRecordRepository
{
    /**
     * 创建活动中奖纪录
     * @param $activityRecord
     * @return mixed
     */
    public function create($activityRecord);

    /**
     * 按活动ID查找中奖纪录
     * @param int $activityId
     * @return mixed
     */
    public function getActivityRecord($activityId);

    public function getActivityRecordsByIdOrTime($activityId,$created_at=null);

    public function findByConditionsPage($condition, $sortArray=array(), $start = 0, $limit = 10);

    public function countByConditions($conditions);

    public function updateRecord($updates, $conditions);

    public function findByConditions($conditions, $sort);

    public function countUserByConditions($conditions);

    public function updateRecords($updates, $conditions);
}
